{
    class User{
        public name: string
        public age: number
        constructor(a:string,b:number){
            this.name = a;
            this.age = b;
        }

        public show():string {
            return `${this.name}的年龄是${this.age}`;
        }
    }

    // 默认情况下不加也是public,可以在外部访问
    const hd = new User('后盾人',18);
    hd.name = "hdms";
    console.log(hd.name);
}